package com.ZengQi.event.service.impl;

import com.ZengQi.event.dao.FinishDao;
import com.ZengQi.event.dao.impl.FinishDapImpl;
import com.ZengQi.event.entity.Finish;
import com.ZengQi.event.service.FinishService;

import java.util.List;

public class FinishServiceImpl implements FinishService {
    private FinishDao finishDao=new FinishDapImpl();
    @Override
    public boolean findIsExistFinish(Finish conditionFinish) {
        return finishDao.getIsExistFinish(conditionFinish);
    }

    @Override
    public boolean saveFinish(Finish finish) {
        return finishDao.insertFinishTopic(finish);
    }

    @Override
    public boolean removeFinish(Finish conditionFinish) {
        return finishDao.deleteFinishTopic(conditionFinish);
    }

    @Override
    public boolean modifyFinishByFinisher(Finish finish, String oldFinisher) {
        return finishDao.updateFinishByFinisher(finish,oldFinisher);
    }

    @Override
    public List<Finish> findFinishedTopicByFinisher(Finish conditionFinish) {
        return finishDao.getFinishedTopicByUserName(conditionFinish);
    }
}
